Transmission Control Protocol (TCP) is a connection-oriented protocol that allows communication between a number of computers or hosts. For example, an application executing on the client or an application layer of the device can communicate with a service running on a server over a transport layer connection. The two hosts, for example, the client and the server that form a transport layer connection keep track of all the data transmitted so that any lost or jumbled segments can be retransmitted or reordered as necessary to maintain reliable transport. In TCP, each of the hosts maintains a buffer for storing data received from the other host. Each of the hosts advertises a window size indicating the maximum amount of data the host can receive. Stated differently, the window size is the amount of space remaining in the recipient's buffer. As such, to ensure successful delivery of packets to the recipient, the sender sends an amount of data that does not exceed the advertised window size of the recipient. The size of the buffer can be predetermined based on a policy.
Issues may arise if the size of the buffer is either too large or too small. For example, if the size of the buffer for an application executing on the client much larger than the operational needs of the application, the buffer is reserving memory resources that are not being used, thereby wasting the unused memory resource. Conversely, if the size of the buffer for the application is much smaller than the operational needs of the application, the throughput of the transport layer connection is sacrificed.
In existing systems in which an intermediary device establishes a transport layer connection between the client and the server, the intermediary device reserves memory of the device for the transport layer connection, which can store data received from the client and the server. In such systems, the size of the memory of the device reserved for the transport layer connection is static and is equal to the buffer size specified in a TCP profile of the intermediary device or a buffer size of an application existing on the client or the server requesting the transport layer connection, whichever is greater. As such, if the size of the memory of the intermediary device that is reserved for the transport layer connection is much larger than the amount of data the client or the server processes at any given time, memory resources of the intermediary device remain unutilized wasting valuable memory resources of the intermediary device. This problem is compounded when the intermediary device establishes multiple transport layer connections between one or more clients and one or more servers.